/*
 * 易族智汇（北京）科技有限公司 版权所有。
 * 未经许可，您不得使用此文件。
 * 官方地址：www.javamall.com.cn
 */
package com.enation.app.javashop.core.client.feignimpl.system;

import com.enation.app.javashop.client.system.LogiCompanyClient;
import com.enation.app.javashop.core.client.fallback.system.LogiCompanyClientFallbackFactory;
import com.enation.app.javashop.core.handler.FeignConfiguration;
import com.enation.app.javashop.model.system.dos.LogisticsCompanyDO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


/**
 * @version v7.0
 * @Description:
 * @Author: zjp
 * @Date: 2018/7/26 14:17
 */
@FeignClient(value = "system-service",fallbackFactory = LogiCompanyClientFallbackFactory.class,configuration = {FeignConfiguration.class})
public interface LogiCompanyClientFeignImpl extends LogiCompanyClient {
    /**
     * 通过code获取物流公司
     * @param code 物流公司code
     * @return 物流公司
     */
    @Override
    @RequestMapping(value = "/client/logi-company/code",method = RequestMethod.GET)
    LogisticsCompanyDO getLogiByCode(@RequestParam("code") String code);

    /**
     * 获取物流公司
     * @param id 物流公司主键
     * @return Logi  物流公司
     */
    @Override
    @RequestMapping(value = "/client/logi-company/{id}",method = RequestMethod.GET)
    LogisticsCompanyDO getModel(@PathVariable("id") Long id);

    /**
     * 查询物流公司列表(不分页)
     * @return Page
     */
    @Override
    @RequestMapping(value = "/client/logi-company",method = RequestMethod.GET)
    List<LogisticsCompanyDO> list();

    /**
     * 查询平台添加的全部物流公司（正常使用未删除的）
     * @return
     */
    @Override
    @RequestMapping(value = "/client/logi-company/normal",method = RequestMethod.GET)
    List<LogisticsCompanyDO> listAllNormal();
}
